﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RayTracing
{
    class MultiRegionTexture:Texture
    {
        public Texture[] texts;
        
        public int sizet;
        

        public MultiRegionTexture(Texture[] texts)
        {
            this.texts = texts;
            
            sizet = texts.Length;
          
        }

        public Color textureAt(P2 p)                       
        {
            return texts[p.region % sizet].textureAt(p);                       
        }
       
    }
}
